<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view' );
class PropertiesViewProperty extends JView
{
	function display($tpl = null)
	{
		global $mainframe;

		if(JRequest::getVar('layout')!='reservar'){
			$mainframe->addCustomHeadTag('<script type="text/javascript" src="components/com_properties/includes/js/image-slideshow.js"></script>');
			$mainframe->addCustomHeadTag('<link rel="stylesheet" href="components/com_properties/includes/css/image-slideshow.css" type="text/css" />');
		}
		$mainframe->addCustomHeadTag('<script type="text/javascript" src="components/com_properties/includes/js/pamoorama0.js"></script>');
		$mainframe->addCustomHeadTag('<link rel="stylesheet" href="components/com_properties/includes/css/publicar.css" type="text/css" />');

		$user =& JFactory::getUser();
		$this->assignRef('user',		$user);
		$Product		=& $this->get('Product');
		$ComboCiudades	=& $this->get('ComboCiudades');

		$this->assignRef('Product',		$Product);
		$this->assignRef('ComboCiudades',		$ComboCiudades);

		global $mainframe;
		$component = JComponentHelper::getComponent( 'com_properties' );
		$params = new JParameter( $component->params );
		$apikey=$params->get('apikey');
		$distancia=$params->get('distancia');
		$lat = $this->Producto->lat;
		$lng = $this->Producto->lng;

		if(!JRequest::getVar('layout')){
			$tpl='property';
		}

		if(JRequest::getVar('task')=='recommend'){
			$tpl='recommend';
		}

		parent::display($tpl);
	}
}